package com.example.demo.sevice.impl;

import com.example.demo.bean.Message;
import com.example.demo.dao.MessageDao;
import com.example.demo.sevice.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageImpl implements MessageService {

    @Autowired
    private MessageDao messageDao;

    @Override
    public List<Message> message(String Hospital) {
        return messageDao.Message(Hospital);
    }

    @Override
    public void insert(Message message) {
        messageDao.insert(message);
    }

    @Override
    public void delete(String Hospital) {
        messageDao.delete(Hospital);
    }

    @Override
    public void update(Message message) {
        messageDao.update(message);
    }

    @Override
    public List<Message> sel(String Hospital) {
        return messageDao.sel(Hospital);
    }
}
